﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnitLibrary.Managers;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using UnitLibrary.GameObjects.Units;

namespace UnitLibrary.GameObjects.PowerUpEffects
{
    public class HealthPack: PowerUpEffect
    {
        public HealthPack()
        { Name = "healthpack"; Health = 25; UnitType = UnitID.Player; }

        public int Health;

        public override void Create(object existingInstance, ComponentM components)
        {
            base.Create(existingInstance, components);
            HealthPack healthpack = (HealthPack)existingInstance;            
            this.Health = healthpack.Health;
        }

        public override void Apply()
        {
            _components.playerManager.Player.Health += this.Health;
        }
    }
}
